<%@ page import="com.goal98.team.Constants" %>
<div class="main_nav">
  <ul>

    <g:isLoggedIn>
      <li>
        <a href="${createLinkTo(dir: '/')}"><g:message code="index.navbutton.home" default="Home"/></a>
      </li>
      <g:ifAnyGranted role="${Constants.ROLE_ADMIN}">
        <li>
          <g:link controller="team" action="search"><g:message code="index.navbutton.team" default="Team"/></g:link>
        </li>
        <li>
          <g:link controller="person" action="list"><g:message code="index.navbutton.user" default="User"/></g:link>
        </li>
        <li>
          <g:link controller="position" action="list"><g:message code="index.navbutton.position" default="Position"/></g:link>
        </li>
      </g:ifAnyGranted>
      <li>
        <g:link controller="venue" action="list"><g:message code="index.navbutton.venue" default="Venue"/></g:link>
      </li>
      <li>
        <g:link controller="myteam" action="account"><g:message code="index.navbutton.myteam" default="My Team"/></g:link>
      </li>
      <li>
        <g:link controller="teamActivity" action="list"><g:message code="index.navbutton.activity" default="Activity"/></g:link>
      </li>
      <li>
        <g:link controller="register" action="show"><g:message code="index.navbutton.userInfo" default="User Information"/></g:link>
      </li>
      <li>
        <g:link controller="logout" action="index"><g:message code="index.navbutton.logout" default="Logout"/></g:link>
      </li>
    </g:isLoggedIn>
    <g:isNotLoggedIn>
      <li>
        <a href="${createLinkTo(dir: '/info/teamCloud')}"><g:message code="index.navbutton.home" default="Home"/></a>
      </li>

      <li>
        <g:link controller="login" action="auth"><g:message code="index.navbutton.login" default="Login"/></g:link>
      </li>
    </g:isNotLoggedIn>
    <li>
      <a href="${createLinkTo(dir: '/tour')}"><g:message code="index.navbutton.tour" default="Take a tour"/></a>
    </li>
    <li>
      <a href="${createLinkTo(dir: '/help')}"><g:message code="help.title" default="Help"/></a>
    </li>
  </ul>
</div>
